<template>
<div id="app">
  <router-view ></router-view>
</div>
</template>
<script type="es6">
  var hidden, visibilityChange;
  if (typeof document.hidden !== "undefined") {
    hidden = "hidden";
    visibilityChange = "visibilitychange";
  } else if (typeof document.mozHidden !== "undefined") {
    hidden = "mozHidden";
    visibilityChange = "mozvisibilitychange";
  } else if (typeof document.msHidden !== "undefined") {
    hidden = "msHidden";
    visibilityChange = "msvisibilitychange";
  } else if (typeof document.webkitHidden !== "undefined") {
    hidden = "webkitHidden";
    visibilityChange = "webkitvisibilitychange";
  }
  document.getElementById("app").style.height = window.document.body.offsetHeight + "px";
export default {
  name: 'App',
  data(){
    return {
    }
  },
  beforeCreate: function() {
    this.proAPI.getJson(this.proAPI.URLS.getAllSysConfig).then((res) =>{
      this.$store.commit("saveConfig",res.data);
      document.title = "【功能预览版本】"+res.data.webName;
      var link = document.createElement('link');
      link.setAttribute('rel','icon');
      link.setAttribute('type','image/x-icon');
      link.setAttribute('href',this.proAPI.RESOURCE_URL+res.data.webLogo);
      document.head.appendChild(link);
    })
  },
  created: function() {
    console.log(document.cookie);
    console.log("created");
  },
  beforeMount: function() {
    console.log("beforeMount");
  },
  mounted: function() {
    setTimeout(()=>{
      this.visible=true;
    },200)
    console.log("mounted");
  },
  beforeUpdate: function() {
    console.log("beforeUpdate");
  },
  updated: function() {
    console.log(this.$route);
    console.log("updated");
  },
  activated: function() {
    console.log("activated");
  },
  deactivated: function() {
    console.log("deactivated");
  },
  beforeDestroy: function() {
    console.log("beforeDestroy");
  },
  destroyed: function() {
    console.log("destroyed");
  },
  errorCaptured: function(err, vm, info) {
    console.log(err);
    console.log(vm);
    console.log(info);
  }
}


</script>
<style scoped>
  #app{
    width:100%;
    height:100%;
    /*background-image: url("./assets/bg1.jpg");*/
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-position: center center;
    background-color: rgba(0,0,0,0.6);
  }
</style>
